using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using TM.Data.Contracts;
using TM.DataAccessor;
using TM.ExceptionManager;
using TM.Model;

namespace TM.Data
{
    public class TaskStatusRepository : ITaskStatusRepository
    {
        private IDataAccessor _dataAccessor;
        private ITMExceptionHandler _exceptionHandler;

        public TaskStatusRepository(IIoCParams ioCParams)
        {
            _dataAccessor = ioCParams.DataAccessor;
            _exceptionHandler = ioCParams.ExceptionHandler;
#if DEBUG
            _exceptionHandler.Throwable = true;
#endif
        }

        #region Implementation of IRepository<TaskStatus>

        public IQueryable<TaskStatus> GetAll()
        {
            throw new NotImplementedException();
        }

        public DataTable GetAllAsDataTable()
        {
            throw new NotImplementedException();
        }

        public TaskStatus GetById(Guid id)
        {
            return GetAllOfTask().FirstOrDefault(item => item.ID == id);
        }

        public DataTable GetByIdAsDataTable(Guid id)
        {
            throw new NotImplementedException();
        }

        public IQueryable<TaskStatus> GetList(Func<TaskStatus, bool> predicate)
        {
            throw new NotImplementedException();
        }

        public TaskStatus GetSingle(Func<TaskStatus, bool> predicate)
        {
            throw new NotImplementedException();
        }

        public TaskStatus GetFisrt(Func<TaskStatus, bool> predicate)
        {
            throw new NotImplementedException();
        }

        public bool Insert(TaskStatus entity)
        {
            throw new NotImplementedException();
        }

        public bool Insert(IList<TaskStatus> entities)
        {
            throw new NotImplementedException();
        }

        public bool Update(TaskStatus entity)
        {
            throw new NotImplementedException();
        }

        public bool Update(IList<TaskStatus> entities)
        {
            throw new NotImplementedException();
        }

        public bool Delete(TaskStatus entity)
        {
            throw new NotImplementedException();
        }

        public bool Delete(IList<TaskStatus> entities)
        {
            throw new NotImplementedException();
        }

        public bool Delete(Guid id)
        {
            throw new NotImplementedException();
        }

        public bool Delete(Func<TaskStatus, bool> predicate)
        {
            throw new NotImplementedException();
            
        }

        public IQueryable<TaskStatus> GetAllOfTask()
        {
            return new List<TaskStatus>
                       {
                           new TaskStatus() {ID = new Guid("DEF7638B-5A8B-4A99-B826-94FD7C572C34"), Name = "New"},
                           new TaskStatus() {ID = new Guid("89757BF2-2B0A-4655-9DB3-BA11740CBB1C"), Name = "Inprogress"}
                       }.AsQueryable();
        }

        #endregion
    }
}